package com.wm.ossService.utils;

import lombok.Setter;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author: sshdg
 * @Date: 2020/9/28 22:17
 */
@Component
@ConfigurationProperties(prefix = "aliyun.oss.file")
@Setter
public class ConstantPropertiesUtils implements InitializingBean {


    private String endpoint;

    private String keyid;

    private String keysecret;

    private String bucketname;


    public static String END_POINT;

    public static String KEY_ID;

    public static String KEY_SECRET;

    public static String BUCKET_NAME;

    @Override
    public void afterPropertiesSet() throws Exception {
        END_POINT = endpoint;
        KEY_ID = keyid;
        KEY_SECRET = keysecret;
        BUCKET_NAME = bucketname;
    }
}
